@import '~ant-design-vue/es/style/themes/default.less';

@ant-pro-prefix             : ant-pro;
@ant-global-sider-zindex    : 106;
@ant-global-header-zindex   : 105;

@multi-tab-prefix-cls: ~"@{ant-pro-prefix}-multi-tab";
@multi-tab-wrapper-prefix-cls: ~"@{ant-pro-prefix}-multi-tab-wrapper";

.@{multi-tab-prefix-cls} {
  position: fixed;
  top: @layout-header-height;
  z-index: 3;
  width: calc(100% - 256px);
  margin: 0 -16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, .08);

  &.sidebar-collapsed {
    width: calc(100% - 80px);
  }

  .ant-tabs-bar {
    border-bottom: 0;
  }

  .ant-tabs.ant-tabs-card {
    .ant-tabs-card-bar {
      .ant-tabs-ink-bar {
        display: none !important;
      }

      .ant-tabs-tab {
        height: 39px;
        padding: 0 22px;
        margin: 0 -10px 0 0;
        border: 0;
        border-radius: 0;
        background-color: #fff;
        font-weight: 500;
        transition: all .3s cubic-bezier(.645, .045, .355, 1);

        &:hover {
          color: #515a6e;
          background: #dee1e6;

          .ant-tabs-close-x {
            transition: all .3s cubic-bezier(.645, .045, .355, 1);
            width: 14px;
          }
        }

        > div {
          height: 39px;
        }

        &.ant-tabs-tab-active {
          color: @primary-color;
          background-color: color(~`colorPalette('@{primary-color}', 1) `);

          .ant-tabs-close-x {
            width: 14px;
            color: @primary-color;
          }
        }

        .ant-tabs-tab-unclosable {
          .ant-dropdown-trigger {
            padding-right: 0;
          }
        }

        .ant-dropdown-trigger {
          max-width: 180px;
          user-select: none;
          display: inline-block;
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;
        }

        .anticon {
          margin-right: 8px;
          margin-top: -30px;
          vertical-align: middle;
        }

        .ant-tabs-close-x {
          display: inline-block;
          width: 0;
          height: 14px;
          font-size: 8px;
          margin-right: 0;
          border-radius: 50%;

          svg {
            margin-top: 3px;
          }

          &:hover {
            color: #fff;
            background-color: #ccc;
          }
        }
      }
    }
  }
}

.topmenu,
.screen-xs {
  .wide {
    .@{multi-tab-prefix-cls} {
      width: 1200px;
      margin: 0;
    }

    .@{multi-tab-wrapper-prefix-cls} {
      max-width: 1200px;
      margin: 0 auto;
    }
  }

  .@{multi-tab-prefix-cls} {
    width: 100%;
    margin: 0 -20px;
  }

  .@{multi-tab-wrapper-prefix-cls} {
    max-width: 100%;
    margin: 0 auto;
  }
}